﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Pout_Porri.Objects.Interface;
using Pout_Porri.Utils;
using System.IO;

namespace Pout_Porri.Objects
{
    public enum SwordStates
    {
        idle,
        attacking,
    }

    class Sword : PhysicsGameEntity, IGameEntity
    {
        protected SwordStates currentState;

        public Sword(Texture2D image, Vector2 position, Vector2 velocity)
            : base(image, position, velocity, true)
        {
            this.texture = image;
            this.spriteTexture = new Texture2D(Game1.graphics.GraphicsDevice, 61, 80);
            DefaultVelocityX = velocity.X;
            this.currentState = SwordStates.idle;
            this.configAnimations();
        }

        public void configAnimations()
        {
            Animation swordIdle = new Animation("idle", new Vector2(150, 80), 100, 0, 0, 1, Axis.X);
            Animation swordAttacking = new Animation("attacking", new Vector2(150, 80), 75, 0, 0, 4, Axis.X);

            this.addAnimation(swordIdle);
            this.addAnimation(swordAttacking);

            this.setCurrentAnimation("idle");
        }

        public override void update(GameTime gameTime)
        {
            base.update(gameTime);
        }

        public override void draw(SpriteBatch spriteBatch)
        {
            base.draw(spriteBatch);
        }
    }
}
